class Solution {
public:
    bool containsDuplicate(vector<int>& nums) {
        unordered_set<int> memo;
        for(int n : nums) 
        {
            if(memo.find(n) != memo.end())
                return true;
            memo.insert(n);
        }
        return false;
    }
};
